package com.ncr.travel.airline.shared.configuration.checkin;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.ncr.travel.airline.shared.configuration.converters.AirportCountryMapper;
import com.ncr.travel.airline.shared.configuration.converters.CountryCodeConverter;
import com.ncr.travel.airline.shared.configuration.converters.CountryAirportCode.CountryReference;
import com.ncr.travel.tas.configuration.model.ConfigurationValue;
import com.ncr.travel.tas.configuration.model.ConfigurationValueTemplate;
import com.ncr.travel.tas.shared.configuration.ConfigurationServiceException;
import com.ncr.travel.tas.shared.configuration.DomainConfiguration;

public interface SharedCheckInConfiguration extends CommonCheckInConfiguration, DomainConfiguration {

	List<String> getPartnerAirlines();

	ConfigurationValueTemplate getPartnerAirlineTemplateForField(String airlineCode, PartnerAirlineField field);

	int getMinimumMinutesToConnectToFlight();

	int getMaximumMinutesToConnectToFlight();

	List<String> getAcceptableSegmentStatusCodes();

	/**
	 * Obtain the SSR codes that inhibit boarding pass generation.
	 * 
	 * @return the identified codes
	 * @throws ConfigurationServiceException if the configuration is not present
	 */
	List<String> getInhibitedSsrCodes();

	/**
	 * Obtain the SSR codes that are not allowed for automated checkin.
	 * 
	 * @return the identified codes
	 * @throws ConfigurationServiceException if the configuration is not present
	 */
	List<String> getUnacceptableSsrCodes();

	ConfigurationValue getAqqResponseMappingConfiguration();

	String getInternalAqqResponseCode(String aqqResponseCodeFromHost);

	boolean isAqqFeatureEnabled();

	String getAqqServiceSuccessText();

	/**
	 * Gets an instance of the <code>CountryCodeConverter</code> class for converting to and from ISO3166 alpha-3 country codes.
	 * 
	 * @return An instance of the <code>CountryCodeConverter</code> class.
	 */
	CountryCodeConverter getCountryCodeConverter();

	/**
	 * Gets an instance of the <code>AirportCountryConverter</code> class for mapping between IATA alpha-3 airport codes and ISO3166 alpha-3 country codes.
	 * 
	 * @return An instance of the <code>AirportCountryConverter</code> class.
	 */
	AirportCountryMapper getAirportCountryMapper();

	/**
	 * Returns the native code to OTA status code mapping used for the flight segment booking status a native code such as "HK", "HX", "SC", "WK" should be the key and a OTA code of "16", "26", "51", "52" should be the
	 * value
	 * 
	 * @return mapping of native/ota status code pairs.
	 */
	Map<String, Integer> getFlightSegmentStatusCodeMappings();

	/**
	 * Obtains the configuration from which a functional decision table can be extracted.
	 * 
	 * @param tableName the reference name of the decision table to retrieve
	 * @return the value data, or null if there is no match
	 */
	ConfigurationValue getDecisionTableConfiguration(String tableName);

	/**
	 * Retrieves information for the specified country code.
	 * 
	 * @param an ISO 3166-1 alpha3 country code
	 * @return the available country data
	 */
	CountryReference getCountryInformation(String countryCode);

	/**
	 * Obtains the list of countries that require resident data to be captured.
	 * 
	 * @return the ISO 3166-1 alpha3 codes for the identified countries
	 * @throws ConfigurationServiceException if the configuration is not present
	 */
	List<String> getCountriesRequiringResidentData();

	/**
	 * Obtains the list of countries that require destination address to be captured.
	 * 
	 * @return the ISO 3166-1 alpha3 codes for the identified countries
	 * @throws ConfigurationServiceException if the configuration is not present
	 */
	List<String> getCountriesRequiringDestinationAddress();

	/**
	 * Obtains the list of countries that require I-94 information to be presented (at the airport) when departing the country.
	 * 
	 * @return the ISO 3166-1 alpha3 codes for the identified countries
	 * @throws ConfigurationServiceException if the configuration is not present
	 */
	List<String> getCountriesRequiringI94OnDeparture();

	/**
	 * Obtains the fully-qualified URL of the Visa/Health information page for a given language.
	 * 
	 * @param language the two-letter language code
	 * @return the link-ready URL
	 * @throws ConfigurationServiceException if the configuration is not present
	 */
	String getVisaHealthURL(String language);

	/**
	 * Obtains the minimum number of passengers that need to be in a reservation before it can be considered a group for group check-in. Reservations with fewer passengers will not be processed as a group.
	 * 
	 * @return the minimum passenger count
	 */
	int getMinimumGroupSize();

	/**
	 * Obtains the maximum number of passengers that can be in a reservation and still be processed as a group for group check-in. If this value is exceeded, group check-in will not be permitted.
	 * 
	 * @return the maximum passenger count
	 */
	int getMaximumGroupSize();

	/**
	 * Determines if passengers in a reservation eligible for group check-in will be further grouped by the surname used during reservation lookup. To use this feature, the system must also be configured to capture
	 * surname data as part of the reservation lookup for all query types.
	 * 
	 * @return true if grouping is on; false otherwise
	 */
	boolean isSurnameGroupingEnabled();

	/**
	 * Obtain the reservation types which can be supported by the application.
	 * 
	 * @return the allowable types, or an empty list if none are found
	 */
	List<String> getAllowedReservationTypes();
}
